package com.xuecheng.auth.controller;

import com.xuecheng.base.model.RestResponse;
import com.xuecheng.ucenter.model.dto.AuthParamsDto;
import com.xuecheng.ucenter.model.dto.FindPasswordDto;
import com.xuecheng.ucenter.service.FindPasswordService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shiminghui
 * @date 2024/9/9 20:58
 * @description: TODO
 */
@RestController
@Slf4j
@RequiredArgsConstructor
public class FindPasswordController {

    private final FindPasswordService findPasswordService;

    @PostMapping("findpassword")
    public RestResponse findPassword(@RequestBody FindPasswordDto findPasswordDto) {
        log.info("找回密码参数:{}", findPasswordDto);
        findPasswordService.findPassword(findPasswordDto);
        return RestResponse.success();
    }
}
